<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="content-type" content="text/html;charset=iso-8859-1" />
		<meta name="author" content="www.frebsite.nl" />
		<meta name="viewport" content="width=device-width initial-scale=1.0 maximum-scale=1.0 user-scalable=yes" />
		<meta name="robots" content="noindex, nofollow" />

		<title>jQuery.mmenu &raquo; Options</title>

		<link type="text/css" rel="stylesheet" href="../docs.css" />
		<link type="text/css" rel="stylesheet" href="../../mmenu.css" />
		
		<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>
		<script type="text/javascript" src="../../jquery.mmenu.min.js"></script>
		<script type="text/javascript">
			$(function() {
				$('nav#menu').mmenu();
			});
		</script>
	</head>
	<body>
		<div id="page">
			<div id="header">
				<a href="#menu"></a>
				Options
			</div>
			<div id="content">
				<h4>onClick <small><em>(object)</em></small></h4>
				<p>A map of options for when a link in the menu is clicked.</p>
				<p>Possible values: an object, <code>true</code> or <code>false</code>.</p>
				<br />
				<p>Code example:</p>
<pre>
$(&quot;#my-menu&quot;).mmenu({
   onClick   : {
      close             : true,
      setSelected       : true,
      setLocationHref   : null,
      delayLocationHref : true,
      blockUI           : null,
      callback          : null
   }
});
</pre>
				<br />
				<p>Note that most boolean-options in the <code>onClick</code> object can also be a function that returns a boolean. Inside this function <code>this</code> refers to the clicked link.</p>
				<br />

				<h5>onClick.close <small><em>(boolean/function)</em></small></h5>
				<p>Whether or not the menu should close after clicking a link inside it.</p>
				<p>Default value: <code>true</code>.</p>

				<h5>onClick.setSelected <small><em>(boolean/function)</em></small></h5>
				<p>Whether or not the clicked link should be visibly &quot;selected&quot;.</p>
				<p>Default value: <code>true</code>.</p>

				<h5>onClick.setLocationHref <small><em>(boolean/function)</em></small></h5>
				<p>Whether or not the <code>window.location.href</code> should be set to the href of the clicked link.</p>
				<p>Default value: <code>false</code> if the href is equal to or starts with a hash (#), <code>true</code> otherwise.</p>

				<h5>onClick.delayLocationHref <small><em>(boolean/function)</em></small></h5>
				<p>Whether or not to delay setting the <code>window.location.href</code> until after the menu has closed.</p>
				<p>Default value: <code>true</code>.</p>

				<h5>onClick.blockUI <small><em>(boolean/function)</em></small></h5>
				<p>Whether or not to block the user interface while loading the new page.</p>
				<p>Default value: <code>false</code> if the href is equal to or starts with a hash (#), <code>true</code> otherwise.</p>

				<h5>onClick.callback <small><em>(function)</em></small></h5>
				<p>A function to call after the menu has closed. Inside this function, <code>this</code> refers to the clicked link.</p>
				<p>Default value: <code>null</code>.</p>

			</div>
			<nav id="menu">
				<ul>
					<li><a href="position.html">position</a></li>
					<li><a href="slidingsubmenus.html">slidingSubmenus</a></li>
					<li><a href="counters.html">counters</a></li>
					<li><a href="searchfield.html">searchfield</a></li>
					<li><a href="dragopen.html">dragOpen</a></li>
					<li class="Selected"><a href="onclick.html">onClick</a></li>
					<li><a href="configuration.html">configuration</a></li>
				</ul>
			</nav>
		</div>
	</body>
</html>